🔨 improve CI/CD and code quality#68
Conversation
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…plate into test-targets-split
- Expand ruff rules with B, C4, SIM and fix all violations - Extract _identify_provider() helper to deduplicate model matching - Narrow exception catches in dspy_inference and dspy_langfuse - Add thread-safe logging initialization with double-checked locking - Fix Python version in ruff workflow to read from .python-version - Add ruff-check hook to pre-commit config - Enable pytest coverage collection with --cov flags - Remove utils/llm from coverage omit list Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Greptile OverviewGreptile SummaryThis PR systematically improves code quality and CI/CD infrastructure. Expands ruff linting with bugbear (B), comprehensions (C4), and simplify (SIM) rules and fixes all resulting violations including proper exception chaining (B904), narrowing bare exception catches, and simplifying dict/isinstance usage. Extracts
Confidence Score: 5/5
Important Files Changed
|
Summary
B(bugbear),C4(comprehensions),SIM(simplify) and fix all resulting violations (B904, B028, B009, C416, SIM114)_identify_provider()helper inglobal_config.pyto deduplicate model-name regex matching acrossllm_api_key()andapi_base()dspy_inference.pyanddspy_langfuse.pyto specific exception typesthreading.Lock()and double-checked locking pattern.python-versionfileruff-checkhook to.pre-commit-config.yaml--cov=src --cov=common --cov=utils(was previously a no-op without--cov)utils/llm/**from coverage omit so LLM utilities are measuredTest plan
make ruffpasses with expanded rulesmake fmtproduces no formatting changesmake test_fast— all 4 tests pass including new thread-safety test🤖 Generated with Claude Code